package com.eian.boot.module.system.permission.model.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

@Data
@Schema(name = "菜单树响应")
public class PermissionTreeVO {
    @Schema(description = "菜单ID")
    private Long id;

    @Schema(description = "父菜单ID")
    private Long parentId;

    @Schema(description = "菜单名称")
    private String title;

    @Schema(description = "菜单编码")
    private String code;

    @Schema(description = "菜单类型：1-目录，2-菜单，3-按钮")
    private Integer type;

    @Schema(description = "菜单URL路径")
    private String url;

    @Schema(description = "菜单图标")
    private String icon;

    @Schema(description = "前端组件路径")
    private String component;

    @Schema(description = "重定向URL")
    private String redirect;

    @Schema(description = "后端权限编码")
    private String permissionCode;

    @Schema(description = "是否外链")
    private Boolean isExternal;

    @Schema(description = "是否缓存")
    private Boolean isCache;

    @Schema(description = "是否显示")
    private Boolean isVisible;

    @Schema(description = "状态：0-禁用，1-启用")
    private Integer status;

    @Schema(description = "排序号")
    private Integer sortOrder;

    @Schema(description = "菜单描述")
    private String description;

    @Schema(description = "创建时间")
    private LocalDateTime createdAt;

    @Schema(description = "子菜单列表")
    private List<PermissionTreeVO> children;
}
